package com.ding.dailyup.repository;

import java.util.List;
import java.util.Optional;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import com.ding.dailyup.model.UserCollectStock;

@Repository
public interface UserCollectStockRepository
		extends JpaRepository<UserCollectStock, Long> {

	Optional<List<UserCollectStock>> findByUserIdAndStatus(Long userId,
			int status);

	Optional<UserCollectStock> findByUserIdAndStockCodeAndStatus(Long userId,
			String stockCode, int status);

	@Override
	UserCollectStock save(UserCollectStock s);
}
